package com.etooling.pdm.repository;

import com.etooling.framework.repository.BaseRepository;
import com.etooling.pdm.entity.GoodsPropRenameRules;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface GoodsPropRenameRulesRepository extends BaseRepository<GoodsPropRenameRules> {

    /**
     * 获取外部重命名，使用产品分类id
     *
     * @param goodsTypeId
     * @return
     */
    @Query(nativeQuery = true, value = "select *   from pdm.t_goods_prop_rename_rules where goods_type_id =?1 and type='" + GoodsPropRenameRules.RENAME_OUT_TYPE + "' order by seq")
    List<GoodsPropRenameRules> getOutListByTypeId(String goodsTypeId);


}
